import * as api from '../../util/api';
import http from '../../util/http';

const state ={

};
const actions={
    YZCompanyFun({commit},obj){
        console.log(obj)
        return http({
            url:api.userCompany,
            method:'post',
            data:obj,
        }).then(resp=>{
            return resp.data
        }).catch(err=>{
            console.log(err)
        })
    },
    userRegisterFun({commit},data){
        //console.log(obj)
        let obj ={
            opportunitCompany:data.opportunitCompany,//公司名称
            opportunitName:data.opportunitName,//联系人
            opportunitTel:data.opportunitTel,//联系电话
            address:data.address,//地址
            email:data.email,
            opportunitReason:data.opportunitReason,//理由
        }
        console.log(obj)
        return http({
            url:api.userJoin,
            method:'post',
            data:obj,
        }).then(resp=>{
            //console.log(resp.data)
            return resp.data
        }).catch(err=>{
            console.log(err)
        })
    }
};
const mutations ={

};
const getters ={

};
export default{
    state,
    actions,
    mutations,
    getters
}